/*
 * Copyright 2007-2008  Lukasz Laszko lukaszlaszko@gmail.com
 * 
 * Permission to use, copy, modify, and distribute this software
 * and its documentation for any purpose and without fee is hereby
 * granted, provided that the above copyright notice appear in all
 * copies and that both that the copyright notice and this
 * permission notice and warranty disclaimer appear in supporting
 * documentation, and that the name of the author not be used in
 * advertising or publicity pertaining to distribution of the
 * software without specific, written prior permission.
 * 
 * The author disclaim all warranties with regard to this
 * software, including all implied warranties of merchantability
 * and fitness.  In no event shall the author be liable for any
 * special, indirect or consequential damages or any damages
 * whatsoever resulting from loss of use, data or profits, whether
 * in an action of contract, negligence or other tortious action,
 * arising out of or in connection with the use or performance of
 * this software. 
 */
package org.pg.biomedics.asr.mpeg7;

import org.simpleframework.xml.Root;
import org.simpleframework.xml.Attribute;

import org.pg.biomedics.asr.mpeg7.code.TokenRepresentations;
import org.pg.biomedics.asr.mpeg7.code.LinguisticUnits;

/**
 * Token stores an entry of the lexicon.
 * @author Lukasz Laszko
 */
@Root(name="Token")
public class WordToken 
{    
    // <editor-fold desc="Fields">
    
    private String word;
    private String representation;
    private String linguisticUnit = LinguisticUnits.WORD;    
    
    // <editor-fold>
    
    // <editor-fold desc="Properties">
    
    @Attribute(name="word")
    public String getWord()
    {
        return word;
    }

    @Attribute(name="word")
    public void setWord(String word)
    {
        this.word = word;
    }

    /**
     * Gets an optional attribute that describes the type of representation
     * of the lexicon entry. Two values are possible: orthographic (the word is
     * represented by its normal orthographic spelling) or nonorthographic (the word
     * is represented by another kind of identifier). A non-orthographic representation
     * may be a phoneme string corresponding to the pronunciation of the entry,
     * encoded according to the phoneticAlphabet attribute.
     * 
     * @return representation type
     */
    @Attribute(name="representation", required=false)
    public String getRepresentation()
    {
        return representation;
    }

     /**
     * Gets an optional attribute that describes the type of representation
     * of the lexicon entry. Two values are possible: orthographic (the word is
     * represented by its normal orthographic spelling) or nonorthographic (the word
     * is represented by another kind of identifier). A non-orthographic representation
     * may be a phoneme string corresponding to the pronunciation of the entry,
     * encoded according to the phoneticAlphabet attribute.
     * 
     * @param representation 
     */
    @Attribute(name="representation", required=false)
    public void setRepresentation(String representation)
    {
        this.representation = representation;
    }

    /**
     * Gets an optional attribute that indicates the type of the linguistic unit
     * corresponding to the entry.
     * @return
     */
    @Attribute(name="linguisticUnit", required=false)
    public String getLinguisticUnit()
    {
        return linguisticUnit;
    }

    /**
     * Sents an optional attribute that indicates the type of the linguistic unit
     * corresponding to the entry.
     * @param linguisticUnit
     */
    @Attribute(name="linguisticUnit", required=false)
    public void setLinguisticUnit(String linguisticUnit)
    {
        this.linguisticUnit = linguisticUnit;
    }       
    
    // </editor-fold>
}
